package com.qf.service.impl;

import com.qf.mapper.UserMapper;
import com.qf.pojo.User;
import com.qf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl  implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User findUser(String username) {
        User user = userMapper.findUserByUsername(username);
        if (user!=null){
            return user;
        }
        return null;
    }

    @Override
    public void addUser(String username, String password) {
        System.out.println(username+"--"+password);
            userMapper.subUser(username,password);
    }
}
